package com.example.demo.TestController;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Description:
 * User: 故我
 * Date: 2023-10-31
 * Time: 11:26
 */
@Controller
@RequestMapping("/hello")  // 不加 ResonseBody 就是返回一个页面
@ResponseBody
public class HelloController {
    @RequestMapping("/html")
    public String getHello() {
        return "/hello.html";
    }
}
